package com.xy.fragment1;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.xy.fragment1.util.UILog;

public class Main2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        Button cle = this.findViewById(R.id.close);
        cle.setOnClickListener(v->{
            setResult(RESULT_OK,new Intent("nothing", this.getIntent().getData()));
            finish();
        });

        Intent intent = this.getIntent();
        if (intent != null) {
            String str = "";
            str +="action:"+intent.getAction()+";";
            str +="data:"+intent.getData()+";";
            UILog log = new UILog(this);
            log.info(str);
        }

    }
}
